package com.seckill.item.mapper;

import com.seckill.item.domian.po.Category3PO;
import com.seckill.item.domian.po.Item;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商品表 Mapper 接口
 * </p>
 *
 * @author zsc
 * @since 2025-05-17
 */
@Mapper
public interface ItemMapper extends BaseMapper<Item> {

    @Select("select distinct first_cate_id as 'firstCateId',second_cate_id as 'secondCateId'," +
            "third_cate_id as 'thirdCateId' from item where status=2")
    List<Category3PO> queryCategoryIdWithItem();
}
